using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using Sedna.Core.Common.Objects.Navigation;
using Sedna.Core.Controller.Configurations;
using Sedna.Core.Controls;

namespace Sedna.Core.pages.Controls.Configuration
{
    public class DataGridCheckBoxValueConfigurator: IDataGridInnerControlConfigurator
    {
        private string valuePath;


        public string ValuePath
        {
            get { return valuePath; }
            set { valuePath = value; }
        }

        public void Configure(Control control, IDataGridColumnConfiguration columnConfiguration, object dataRow, Sedna.Core.Controller.IExecutionContext executionContext)
        {
            ImsCheckBox checkBox = (ImsCheckBox)control;
            checkBox.Attributes["coreimsee:value"] = ScopePathParser.Instance.Parse(dataRow, valuePath).Value.ToString();
        }
    }
}

